package org.lee.other;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * Customer
 *
 * @author dralee
 * @date 2022-01-20 13:48:49
 **/
@Data
public class Customer {
    private String name;
    private List<Order> orders;

    public Customer() {
        orders = new ArrayList<>();
    }

    public Customer(String name) {
        this();
        this.name = name;
    }

    public Customer addOrder(Order order) {
        orders.add(order);
        return this;
    }
}
